import request from '@/utils/request'

// 查询用户券码列表
export function listPeopleCoupon(query) {
  return request({
    url: '/business/peopleCoupon/list',
    method: 'get',
    params: query
  })
}

// 查询用户券码详细
export function getPeopleCoupon(userCouponId) {
  return request({
    url: '/business/peopleCoupon/' + userCouponId,
    method: 'get'
  })
}

// 新增用户券码
export function addPeopleCoupon(data) {
  return request({
    url: '/business/peopleCoupon',
    method: 'post',
    data: data
  })
}

// 修改用户券码
export function updatePeopleCoupon(data) {
  return request({
    url: '/business/peopleCoupon',
    method: 'put',
    data: data
  })
}

// 删除用户券码
export function delPeopleCoupon(userCouponId) {
  return request({
    url: '/business/peopleCoupon/' + userCouponId,
    method: 'delete'
  })
}
